import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;


/**
 * @author John zhang
 * @version 0.1
 */
public class T {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main( String[] args ) throws Exception {

		Schema schema = new Schema ( 1, "com.news.app.domain" );
		schema.setDefaultJavaPackageDao ( "com.news.app.dao" );
		Entity e = schema.addEntity ( "FavoriteNews" );
		e.addStringProperty ( "id" ).primaryKey ();
		e.addStringProperty ( "catId" );
		e.addStringProperty ( "title" );
		e.addStringProperty ( "description" );
		e.addLongProperty ( "inputTime" );
		e.addLongProperty ( "updateTime" );
		e.addStringProperty ( "thumb" );
		e.addStringProperty ( "content" );
		e.addStringProperty ( "modelId" );
		e.addStringProperty ( "images" );
		e.addStringProperty ( "hits" );
		
		DaoGenerator daoGenerator = new DaoGenerator();
		daoGenerator.generateAll ( schema, "src/main/java" );
	}

}
